<div class="operation_new">
	<h2><%= @operation.id ? "Edit: #{@operation.name}" : "New Entry" %></h2>

	<% form_for(@operation) do |f| %>
	<%= f.error_messages %>
		<dl class="crud">
			<dt><%= f.label :name %></dt>
			<dd><%= f.text_field :name %></dd>

			<dt><%= f.label :value %></dt>
			<dd><%= f.text_field :value %></dd>
		
			<dt>Account</dt>
			<dd><%= select("operation", "account_id", Account.find(:all).collect {|a| [a.bank, a.id] } ) %></dd>
		
			<!--dt><%= f.label :expiration_date %></dt>
			<dd><%= f.text_field :expiration_date, :maxlength => 10  %></dd>
		
			<dt><%= f.label :pay_date %></dt>
			<dd><%= f.text_field :pay_date, :maxlength => 10  %></dd-->
		
			<dt><%= f.label :tags %></dt>
			<dd><input name="tags" size="30" value="<%= @operation.tags ? @operation.tags.map{|t| t.name}.join(" ") : "" %>" /></dd>
		
			<dt><%= f.label :details %></dt>
			<dd><%= f.text_area :details %></dd>

			<%= f.submit "Create", :class => 'button', :value => 'Save' %>
			<%= f.submit "Cancel", :class => 'button', :value => 'Cancel' %>
		
		</dl>
	<% end %>
</div>